vim interactive mode AKA confirmation mode

aliases
No value
tags
No value
description
No value
status
ai response
project
false
area
false
resource
false
title
vim interactive mode AKA confirmation mode
created
2025-03-12T13:28:26
updated
2025-03-12T13:28:57

In Vim, you can enter an interactive mode to replace blank lines one by one using “confirmation mode” in the :substitute command. Here’s how:

Command:

:g/^\s*$/c

Explanation:

Interactive Mode:

After running the command, Vim will prompt you for each blank line with options like:

replace with:

Then, you can:

Would you like a variation with an actual replacement text?